﻿<Core:DXWindow x:Class="ThanNhanTao.frmThongKeBenhNhanRaVaoKhoa"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:Core="http://schemas.devexpress.com/winfx/2008/xaml/core"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
        xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
        xmlns:my="clr-namespace:ThanNhanTao.CommonControl"
        Core:ThemeManager.ThemeName="Office2007Blue" Icon="/ThanNhanTao;component/Images/Icons/print-16x16.png"  
        Title="Thống kê bệnh nhân ra vào khoa" Height="600" Width="600">
    <Core:DXWindow.Resources>
        <Style TargetType="Label">
            <Setter Property="VerticalAlignment" Value="Center" />
        </Style>
        <Style TargetType="dxe:DateEdit">
            <Setter Property="Margin" Value="2,2" />
        </Style>
        <Style TargetType="dxe:ComboBoxEdit">
            <Setter Property="Margin" Value="1,1" />
        </Style>
        <Style TargetType="Button">
            <Setter Property="Margin" Value="3,3" />
        </Style>
    </Core:DXWindow.Resources>
    <Grid>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="120"></RowDefinition>
                <RowDefinition Height="200*"></RowDefinition>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <GroupBox Header="Thông tin thống kê">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="28"></RowDefinition>
                        <RowDefinition Height="28"></RowDefinition>
                        <RowDefinition Height="28"></RowDefinition>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="360"></ColumnDefinition>
                        <ColumnDefinition Width="10"></ColumnDefinition>
                        <ColumnDefinition></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <my:CalendarControl x:Name="calendar" Grid.RowSpan="4"></my:CalendarControl>
                    <StackPanel Orientation="Horizontal" Grid.ColumnSpan="2" Grid.Column="2" Grid.Row="2">
                        <Button Content="Thống kê" Name="btnThongKe" Width="80" Click="btnThongKe_Click" />
                        <Button Content="Đóng" Name="btnDong" Width="80" Click="btnDong_Click" />
                    </StackPanel>
                </Grid>
            </GroupBox>
            <dxg:GridControl Name="gridThongKeBenhAn" Grid.Row="2">
                <dxg:GridControl.Columns>
                    <dxg:GridColumn FieldName="TinhTrangRaVao" ReadOnly="True" AllowBestFit="True" GroupIndex="0" Header=""/>
                    <dxg:GridColumn FieldName="TenBenhNhan" Header="Họ tên bệnh nhân" AllowBestFit="True"/>
                    <!--<dxg:GridColumn FieldName="ThuTu" Header="" AllowBestFit="True" Visible="False" GroupIndex="1"/>-->
                </dxg:GridControl.Columns>
                <dxg:GridControl.View>
                    <dxg:TableView Name="tbvThongKeBenhAn" ShowGroupPanel="False" ShowAutoFilterRow="True"
                               AutoWidth="True" AllowGrouping="True" AllowEditing="False" FontWeight="Bold"
                               NavigationStyle="Row"
                               />
                </dxg:GridControl.View>
                <dxg:GridControl.GroupSummary>
                    <dxg:GridSummaryItem DisplayFormat="Số lượng: {0:n0}" FieldName="TinhTrangRaVao"
                                        ShowInColumn="" SummaryType="Count" />
                </dxg:GridControl.GroupSummary>
            </dxg:GridControl>
        </Grid>
    </Grid>
</Core:DXWindow>
